#!/bin/sh

workdir=~/workshop/gitee/3place/

cd $workdir

for dirs in ` ls -l |grep ^d |sed -e "/EN$/d" |awk '{print $NF}'`
do

	cd $dirs
	getmjbook
	getmmbook
	cd ..
done

rm -f allmingju.md allmemo.md 

for files in `find .|grep -w mingju.md`
do
	bookname=`echo $files |  awk -F/ '{print $2}' |sed -e "s/[1234567890]//g"`

	cat $files |sed -e "/^#/d" |sed -e "/^$/d" |sed -e "s/.*\. //g" |sed -e "s/$/《$bookname/g" |sed -e "s/$/》/g" |awk '{print $0 "\n"}' >>allmingju.md
done

for files in `find .|grep -w memo.md`
do
	cat $files >>allmemo.md
done


